fix: refresh token utilization#997
Conversation
|
@rebelchris @idoshamun in time this gets approved. In my humble opinion, I think we should consider publishing to stores once merged as the actions themselves (upvotes/making a comment/etc) is what we expect from the users to accomplish. |
|
The |
The reason why I created another one for refreshing the token, is the
We instantiate the With that, we can definitely request from |
|
There's a whole other permanent fix for this but I hesitated for the moment since we have the upcoming re-work of authentication. The fix I was thinking of is, to create a middleware in the API server whenever we check the jwt validity and to refresh the token if found to be expired. So we won't have to create a timeout and force the refresh of token from the frontend. |
This is can introduce some security issues, so I wouldn't go down this path.
I don't mind really. It will not happen that often. Thanks for considering it though :) |
idoshamun
left a comment
There was a problem hiding this comment.
Looks great now! Please wait for Chris's review as well
rebelchris
left a comment
There was a problem hiding this comment.
Nice this looks great!
Great find on abstracting the refresh token hook.

Changes
I think this is one comment from our beta user has really helped us finding the root cause.
Describe what this PR does
Blocked until this PR is merged: https://github.com/dailydotdev/daily-gateway/pull/471
Please make sure existing components are not breaking/affected by this PR
Manual Testing
On those affected packages:
Did you test the modified components media queries?
Did you test on actual mobile devices?
Manually waited for quite some while to ensure the token is refreshed (vice-versa), to ensure workability.

Preview:
As it can be noticed, the requests have succeeded after the refresh token call.
Preview before the fix:

DD-WT-113 #done